import Mock from 'mockjs'
import { baseUrl } from '@/api/config'

const produceLocal = function () {
    return Mock.mock({
        status: "200",
        msg: "请求成功",
        "data|3": [
            {
                "id|+1": 0,
                name: "@ctitle(25,30)",
                imgUrl: "@image('200x100', '@color',' ')",
            },
        ],
    });
}
const produce = function () {
    return Mock.mock({
        status: "200",
        msg: "请求成功",
        "data|3": [
            {
                name: "@cname", // Mock.Random.cname(),
                age: "@integer(20,50)",
            },
        ],
    });
}

Mock.mock(baseUrl + '/local', produceLocal)
Mock.mock(baseUrl + "/api/users", "get", produce);
